<?php
namespace BP\GPM;
require_once("BP/En/Map.php");
class Group extends EntityNoName {
	public function getHisUAC () 
	{
		$uac = new UAC();
		$uac->OpenForAppAdmin();
		return $uac;
	}
	public static function constructor__ () 
	{
		$me = new self();
		return $me;
	}
	public static function constructor__String ($no) // [String no]
	{
		$me = new self();
		$me->setNo($no);
		$me->Retrieve();
		return $me;
	}
	public function getEnMap () 
	{
		if (($this->get_enMap() != NULL))
		{
			return $this->get_enMap();
		}
		$map = new Map("GPM_Group", "权限�?");
		$map->setIsAutoGenerNo( TRUE );
		$map->AddTBStringPK(GroupAttr::$No, NULL, "编号",  TRUE ,  TRUE , 3, 3, 3);
		$map->AddTBString(GroupAttr::$Name, NULL, "名称",  TRUE ,  FALSE , 0, 300, 20);
		$map->AddTBInt(GroupAttr::$Idx, 0, "显示顺序",  TRUE ,  FALSE );
		$map->getAttrsOfOneVSM()->Add(GroupEmps::constructor__(), Emps::constructor__(), GroupEmpAttr::$FK_Group, GroupEmpAttr::$FK_Emp, EmpAttr::$Name, EmpAttr::$No, "人员(�?�?)");
		$map->getAttrsOfOneVSM()->AddBranchesAndLeaf(GroupEmps::constructor__(), Emps::constructor__(), GroupEmpAttr::$FK_Group, GroupEmpAttr::$FK_Emp, "人员(�?)", EmpAttr::$FK_Dept, EmpAttr::$Name, EmpAttr::$No, "@WebUser.getFK_Dept()");
		$map->getAttrsOfOneVSM()->Add(GroupStations::constructor__(), Stations::constructor__(), GroupEmpAttr::$FK_Group, GroupStationAttr::$FK_Station, EmpAttr::$Name, EmpAttr::$No, "岗位(�?�?)");
		$map->getAttrsOfOneVSM()->AddGroupListModel(GroupStations::constructor__(), Stations::constructor__(), GroupStationAttr::$FK_Group, GroupStationAttr::$FK_Station, "岗位(平铺)", StationAttr::$FK_StationType);
		$map->getAttrsOfOneVSM()->AddBranches(GroupMenus::constructor__(), Menus::constructor__(), $BP->GPM->GroupMenuAttr->FK_Group, $BP->GPM->GroupMenuAttr->FK_Menu, "绑定菜单", EmpAttr::$Name, EmpAttr::$No, "0");
		$this->set_enMap($map);
		return $this->get_enMap();
	}
}
?>
